<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>BendTech Directory - Password Reset</title>

    <?php include_once 'PP.php'; ?>
    <?php include_once 'PPEntry.php'; ?>
    <?php
    // Get/create the entry object 
    $entry = PPEntry::get_current_entry();
    ?>
  </head>

  <body id="pp_edit">
    <?php include_once('bendtech-header.php') ?>

    <?php if (!$entry) { ?>
      <p>Sorry, we were not able to find that entry.</p>
    <?php } elseif ($entry->data['owner'] != $_POST['address']) { ?>
      <p>Sorry, "<?= $_POST['address'] ?>" is not the address we have on file for this entry.</p>
    <?php } else {
      $entry->reset_password();
      ?>
      <p>The password has been reset.  Please check your email for a message containing the new password</p>
   <?php } ?>

    <?php include_once('bendtech-footer.php') ?>
  </body>
</html>
